
package com.chocho.producerserver.client;

import com.chocho.producerserver.client.hystrix.ConsumeHystrix;
import com.chocho.producerserver.vo.Code;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;


/**
 * @Auther: qiuzp
 * @Date: 19-1-5 下午5:41
 * @Description:
 */

@Component
@FeignClient(value = "consume-server",fallback = ConsumeHystrix.class)
public interface ConsumeClient {

    /**
     * 远程调用编译模块编译，直接返回结果过，绕过消息队列
     */
    @PostMapping("/consume/common/compile")
    @ResponseBody
    Map<String, Object> JavaCompile(@RequestBody Code code);

}

